package zuoye23.zuoye2;

public class Teacher {
//    2：老师姓名，年龄，教龄和性别属性，都有自我介绍(selfIntroduce)和上课(giveLession)的方法。
//    有java老师（熟悉java），UI老师(有绘制图像的方法)和.net老师（有教C#的方法），通过继承来描述这个关系
    private String name;
    private int age;
    private int seniority;
    private String sex;

    public Teacher() {
    }

    public String selfIntroduce(){
        return "我是"+name+",今年"+age+"岁，教龄"+seniority+"年，性别"+sex;
    }
    //上课(giveLession)的方法
    public String giveLession(){
        return "上课";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSeniority() {
        return seniority;
    }

    public void setSeniority(int seniority) {
        this.seniority = seniority;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
